var ChatAudioMsg = (function(){    
    var _audioMsgTmp = [
        '<div class="audioMsgWrapper">',
            '<audio controls preload="metadata" onended="this.load()">',
                '<source src="<%=o.src%>?t=<%=o.createTime%>" type="<%=o.type%>" />',
            '</audio>',                
        '</div>',
        '<div class="msgMetadata">',            
            'Duration:<%=o.content.duration%>&#39;&#39;.',
            '&nbsp;<span class="dbtn" onclick="ujs.browser.file.downloadFromLink(\'<%=o.src%>\', \'audio.mp3\')">Download</span>',
        '</div>'
    ].join('');
        
    var _chatAudioMsg = (function ChatAudioMsg(){
    }).extend(ChatMsg, 'ChatAudioMsg');
    
    _chatAudioMsg.prototype._init = function(){        
        var $audioMsg = $(tmpl(_audioMsgTmp, this.msg));                
        this.$wrapper.find('.chatMsgItemContent').prepend($audioMsg);        
    };
    return _chatAudioMsg;
})();